# -*- coding: utf-8 -*-
# 模块：主程序
import tkinter
import tkinter.messagebox

from settings import Settings
import AP_menubar
import AP_statusbar


main_window = tkinter.Tk()
set = Settings()    # 初始化自定义类：Settings

main_window.title("Advanced Productivity")
main_window.geometry(set.window_width+"x"+set.window_height)    # 设置窗口宽度、高度
main_window.resizable(width=True, height=True)  # 设置窗口宽度、高度是否可调节


# 【菜单栏】
# 创建一个顶层菜单
menu_bar = tkinter.Menu(main_window)
# 在顶层菜单添加菜单
AP_menubar.meun_file(main_window, menu_bar)    # 文件菜单
AP_menubar.meun_edit(main_window, menu_bar)    # 编辑菜单
AP_menubar.meun_help(main_window, menu_bar)    # 帮助菜单
# 显示菜单
main_window.config(menu=menu_bar)


# 【框架布局】
# 左边
frame_left = tkinter.Frame(main_window)
frame_left.pack(side="left")

# 右边
frame_right = tkinter.Frame(main_window)
frame_right.pack(side="right")

# 底边
frame_footer = tkinter.Frame(main_window, width=300, height=1, bg="#0078D6")
frame_footer.pack(side="bottom")

frame_footer_left = tkinter.Frame(frame_footer)
frame_footer_left.pack(side="left")

frame_footer_right = tkinter.Frame(frame_footer)
frame_footer_right.pack(side="right")


# 【左边】


# 【右边】


# 【状态栏】
AP_statusbar.statusbar_file_information(frame_footer_left)
AP_statusbar.statusbar_work_status(frame_footer_right)


# 【主窗口消息循环】
main_window.mainloop()
